.class Lcom/esfile/screen/recorder/media/b$b;
.super Ljava/lang/Object;
.source "DuThumbGrabber.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/esfile/screen/recorder/media/b;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "b"
.end annotation


# instance fields
.field private a:I

.field private b:I

.field private c:I

.field private d:I

.field private e:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

.field private f:Lcom/esfile/screen/recorder/media/glutils/d;

.field private final g:Ljava/lang/Object;

.field h:Z

.field private i:Z

.field private j:Z

.field private k:Landroid/graphics/Bitmap;

.field private l:Z


# direct methods
.method private constructor <init>(IIIILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    const/4 v0, 0x0

    .line 4
    iput-boolean v0, p0, Lcom/esfile/screen/recorder/media/b$b;->i:Z

    .line 5
    iput-boolean v0, p0, Lcom/esfile/screen/recorder/media/b$b;->j:Z

    const/4 v1, 0x0

    .line 6
    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->k:Landroid/graphics/Bitmap;

    .line 7
    iput-boolean v0, p0, Lcom/esfile/screen/recorder/media/b$b;->l:Z

    .line 8
    iput p1, p0, Lcom/esfile/screen/recorder/media/b$b;->a:I

    .line 9
    iput p2, p0, Lcom/esfile/screen/recorder/media/b$b;->b:I

    .line 10
    iput p3, p0, Lcom/esfile/screen/recorder/media/b$b;->c:I

    .line 11
    iput p4, p0, Lcom/esfile/screen/recorder/media/b$b;->d:I

    .line 12
    iput-object p5, p0, Lcom/esfile/screen/recorder/media/b$b;->e:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    return-void
.end method

.method public static a(IIIILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)Lcom/esfile/screen/recorder/media/b$b;
    .locals 7
    .param p4    # Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    new-instance v6, Lcom/esfile/screen/recorder/media/b$b;

    move-object v0, v6

    move v1, p0

    move v2, p1

    move v3, p2

    move v4, p3

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Lcom/esfile/screen/recorder/media/b$b;-><init>(IIIILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)V

    .line 2
    new-instance p0, Ljava/lang/Thread;

    const-string p1, "draw wrapper"

    invoke-direct {p0, v6, p1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 3
    invoke-virtual {p0}, Ljava/lang/Thread;->start()V

    return-object v6
.end method


# virtual methods
.method public a()Landroid/view/Surface;
    .locals 2

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    monitor-enter v0

    .line 5
    :goto_0
    :try_start_0
    iget-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v1, :cond_0

    iget-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->i:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v1, :cond_0

    .line 6
    :try_start_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->wait()V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catch_0
    move-exception v1

    .line 7
    :try_start_2
    invoke-virtual {v1}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_0

    .line 8
    :cond_0
    iget-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v1, :cond_2

    iget-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->i:Z

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    if-nez v1, :cond_1

    goto :goto_1

    .line 9
    :cond_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/glutils/d;->c()Landroid/view/Surface;

    move-result-object v1

    monitor-exit v0

    return-object v1

    :cond_2
    :goto_1
    const/4 v1, 0x0

    .line 10
    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    .line 11
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_3

    :goto_2
    throw v1

    :goto_3
    goto :goto_2
.end method

.method public b()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    if-eqz v1, :cond_0

    .line 3
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/glutils/d;->d()V

    :cond_0
    const/4 v1, 0x0

    .line 4
    iput-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    .line 5
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 6
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public c()Landroid/graphics/Bitmap;
    .locals 4

    const/4 v0, 0x0

    .line 1
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    monitor-enter v1
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    .line 2
    :goto_0
    :try_start_1
    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v2, :cond_0

    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->i:Z

    if-nez v2, :cond_0

    .line 3
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v2}, Ljava/lang/Object;->wait()V

    goto :goto_0

    .line 4
    :cond_0
    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v2, :cond_4

    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->i:Z

    if-eqz v2, :cond_4

    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    if-nez v2, :cond_1

    goto :goto_2

    .line 5
    :cond_1
    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->k:Landroid/graphics/Bitmap;

    const/4 v2, 0x0

    .line 6
    iput-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->l:Z

    const/4 v3, 0x1

    .line 7
    iput-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->j:Z

    .line 8
    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V

    .line 9
    :goto_1
    iget-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v3, :cond_2

    iget-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->l:Z

    if-nez v3, :cond_2

    .line 10
    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->wait()V

    goto :goto_1

    .line 11
    :cond_2
    iput-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->j:Z

    .line 12
    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v2, :cond_3

    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->l:Z

    if-eqz v2, :cond_3

    .line 13
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->k:Landroid/graphics/Bitmap;

    monitor-exit v1

    return-object v2

    .line 14
    :cond_3
    monitor-exit v1

    goto :goto_3

    .line 15
    :cond_4
    :goto_2
    monitor-exit v1

    return-object v0

    :catchall_0
    move-exception v2

    .line 16
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :try_start_2
    throw v2
    :try_end_2
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0

    :catch_0
    move-exception v1

    .line 17
    invoke-virtual {v1}, Ljava/lang/InterruptedException;->printStackTrace()V

    :goto_3
    return-object v0
.end method

.method public run()V
    .locals 6

    const/4 v0, 0x0

    const/4 v1, 0x1

    .line 1
    :try_start_0
    new-instance v2, Lcom/esfile/screen/recorder/media/glutils/d;

    iget v3, p0, Lcom/esfile/screen/recorder/media/b$b;->a:I

    iget v4, p0, Lcom/esfile/screen/recorder/media/b$b;->b:I

    invoke-direct {v2, v3, v4}, Lcom/esfile/screen/recorder/media/glutils/d;-><init>(II)V

    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    .line 2
    invoke-virtual {v2, v1}, Lcom/esfile/screen/recorder/media/glutils/d;->a(Z)V

    .line 3
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    iget v3, p0, Lcom/esfile/screen/recorder/media/b$b;->c:I

    iget v4, p0, Lcom/esfile/screen/recorder/media/b$b;->d:I

    iget-object v5, p0, Lcom/esfile/screen/recorder/media/b$b;->e:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    invoke-virtual {v2, v3, v4, v5}, Lcom/esfile/screen/recorder/media/glutils/d;->a(IILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    nop

    .line 4
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    if-eqz v2, :cond_0

    .line 5
    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/glutils/d;->h()V

    .line 6
    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    .line 7
    :cond_0
    :goto_0
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    monitor-enter v2

    .line 8
    :try_start_1
    iput-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->i:Z

    .line 9
    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->notify()V

    .line 10
    monitor-exit v2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_2

    .line 11
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    if-nez v2, :cond_1

    return-void

    .line 12
    :cond_1
    :goto_1
    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v2, :cond_5

    .line 13
    :try_start_2
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    monitor-enter v2
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    .line 14
    :goto_2
    :try_start_3
    iget-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v3, :cond_2

    iget-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->j:Z

    if-nez v3, :cond_2

    .line 15
    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->wait()V

    goto :goto_2

    .line 16
    :cond_2
    iget-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-nez v3, :cond_3

    .line 17
    monitor-exit v2

    goto :goto_4

    .line 18
    :cond_3
    monitor-exit v2
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 19
    :try_start_4
    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->h:Z

    if-eqz v2, :cond_4

    iget-boolean v2, p0, Lcom/esfile/screen/recorder/media/b$b;->j:Z

    if-eqz v2, :cond_4

    .line 20
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/glutils/d;->i()Landroid/graphics/Bitmap;

    move-result-object v2

    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->k:Landroid/graphics/Bitmap;
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_3

    :catchall_0
    move-exception v3

    .line 21
    :try_start_5
    monitor-exit v2
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    :try_start_6
    throw v3
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_1

    .line 22
    :catch_1
    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->k:Landroid/graphics/Bitmap;

    .line 23
    :cond_4
    :goto_3
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    monitor-enter v2

    const/4 v3, 0x0

    .line 24
    :try_start_7
    iput-boolean v3, p0, Lcom/esfile/screen/recorder/media/b$b;->j:Z

    .line 25
    iput-boolean v1, p0, Lcom/esfile/screen/recorder/media/b$b;->l:Z

    .line 26
    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b$b;->g:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V

    .line 27
    monitor-exit v2

    goto :goto_1

    :catchall_1
    move-exception v0

    monitor-exit v2
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_1

    throw v0

    :cond_5
    :goto_4
    const-string v0, "dtgr"

    const-string v1, "DrawWrapper break while"

    .line 28
    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 29
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b$b;->f:Lcom/esfile/screen/recorder/media/glutils/d;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/glutils/d;->h()V

    return-void

    :catchall_2
    move-exception v0

    .line 30
    :try_start_8
    monitor-exit v2
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    goto :goto_6

    :goto_5
    throw v0

    :goto_6
    goto :goto_5
.end method
